package com.api.shopapi.service;

import com.api.shopapi.entity.Berth;
import com.api.shopapi.entity.dto.BerthCountDTO;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author maochuan
 */
@Service
public interface BerthService {

    int insert(Berth berth);

    int updateByBerthCode(Berth berth);

    int deleteByBerthCode(String berthCode);

    List<Berth> getListAll();

    Berth getByBerthCode(String berthCode);

    Berth getByNumber(String number, String roomCode, String institutionCode);

    PageInfo<Berth> getPageList(int pageIndex, int pageSize, String institutionCode, int number, String roomCode, int status);



    List<Berth> getListByRoomCode(String roomCode);




    List<Berth> getListByRoomCodeAndStatus0(String roomCode);

    List<Berth> getListByRoomCodeAndStatusNot11(String roomCode);

    Berth getByName(String name, String roomCode, String institutionCode);

    BerthCountDTO getBerthNumByIns(List<String> institutionCode);



    /**
     * 机构床位总数
     * */
    List<Berth> ListByInstitutionCode(String institutionCode);

    /**
     * 已入住床位总数
     * */
    List<Berth> ListCheckinByInstitutionCode(String institutionCode);


    PageInfo<Berth> pageByGovCode(int pageIndex, int pageSize, String governmentCode);


}
